/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package de.carcophan.jimdb.jsf.security;

import de.carcophan.jimdb.ejb.entites.service.AccessLogFacade;
import java.io.Serializable;
import javax.ejb.EJB;
import javax.enterprise.context.RequestScoped;
import javax.faces.model.DataModel;
import javax.faces.model.ListDataModel;
import javax.inject.Named;

/**
 *
 * @author jheidenreich
 */
@Named
@RequestScoped
public class AccessLogController implements Serializable{

    @EJB
    private AccessLogFacade logFacade;
    private DataModel<AccessLog> items = null;

    public DataModel<AccessLog> getItems() {
        if (this.items == null) {
            this.items = new ListDataModel<AccessLog>(logFacade.findAll());
        }
        return items;
    }

    public void setItems(DataModel<AccessLog> items) {
        this.items = items;
    }
}
